<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增旅游景区信息管理')" />
    <th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-untitled-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">景区名称：</label>
                <div class="col-sm-8">
                    <input name="untitledName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">景区详细信息：</label>
                <div class="col-sm-8">
                    <input id="description" name="description" type="hidden">
                    <div class="summernote"></div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">景区地址：</label>
                <div class="col-sm-8">
                    <input name="address" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所在城市：</label>
                <div class="col-sm-8">
                    <input name="city" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">省份：</label>
                <div class="col-sm-8">
                    <input name="province" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">纬度：</label>
                <div class="col-sm-8">
                    <input name="latitude" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">经度：</label>
                <div class="col-sm-8">
                    <input name="longitude" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">开放时间描述：</label>
                <div class="col-sm-8">
                    <input name="openingHours" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">门票价格：</label>
                <div class="col-sm-8">
                    <input name="ticketPrice" class="form-control" type="number">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script type="text/javascript">
        var prefix = ctx + "lvyou/untitled"
        $("#form-untitled-add").validate({
            focusCleanup: true
        });
        $(document).ready(function () {
            $('.summernote').summernote({
                lang: 'zh-CN'
            });
        });

        function submitHandler() {
            var aHTML = $('.summernote').summernote('code');
            $('#description').val(aHTML);
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-untitled-add').serialize());
            }
        }
    </script>
</body>
</html>